import axios from '~/axios'

// 添加合同模板字段
export function addContractTemplateFieldApi(data) {
    return axios.post('/basic/lindi/contractTemplateField/addContractTemplateField', data)
}

// 删除合同模板字段
export function deleteContractTemplateFieldByContractTemplateFieldIdApi(contractTemplateFieldId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/contractTemplateField/deleteContractTemplateFieldByContractTemplateFieldId',
        params: {
            contractTemplateFieldId: contractTemplateFieldId
        }
    })
}

// 修改合同模板字段
export function updateContractTemplateFieldByContractTemplateFieldIdApi(data) {
    return axios.put('/basic/lindi/contractTemplateField/updateContractTemplateFieldByContractTemplateFieldId', data)
}

// 分页查询合同模板字段列表
export function getPageContractTemplateFieldListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/contractTemplateField/getPageContractTemplateFieldList',
        params: params
    })
}

// 根据ID查询合同模板字段详情
export function getContractTemplateFieldByContractTemplateFieldIdApi(contractTemplateFieldId) {
    return axios.get(`/basic/lindi/contractTemplateField/getContractTemplateFieldByContractTemplateFieldId/${contractTemplateFieldId}`)
}